﻿using ALMDDD.Application.ViewModels.SysUser;
using ALMDDD.Domain.Model;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;

namespace ALMDDD.Application.AutoMapper
{
    /// <summary>
    /// 领域实体转换为视图模型
    /// </summary>
    public class DoMainToViewModelMapping : Profile
    {
        public DoMainToViewModelMapping()
        {
            CreateMap<Sys_User, SysUserViewModel>();
            CreateMap<Sys_User, SysUserListsVO>()
                .ForMember(d => d.Roles, o => o.MapFrom(s => s.Sys_Role));
        }

    }
}
